# -*- coding:utf-8 -*-

from abc import ABCMeta, abstractmethod
from src.core import macro
from src.utils import runcmd


class PkgHelperInterface(object):
    __metaclass__ = ABCMeta

    _spec_names = None

    @abstractmethod
    def replace_vendor(self):
        pass

    def rpm_build(self):
        spec = macro.RPM_SRC_SETUP_SPEC_PATH + self._spec_names
        runcmd.rpm_build(spec)

    @abstractmethod
    def replace_rpm(self):
        pass
